package xyh;

//import xyh.ContributionSystem.ConSysByUser;
//import xyh.ContributionSystem.ContributionSystem;

public class Main {
    public static void main(String[] args) {
        //ConSysByUser conSysByUser = new ConSysByUser();
        //conSysByUser.addProjectSys(100);
        //xyh.ContributionSystem con = new xyh.ContributionSystem();
        //System.out.println(con.getProjectInfo(1).toString());
//        List<Project> list = con.getAllProjects();
//        for (int i = 0; i < list.size(); i++) {
//            System.out.println(list.get(i).toString());
//        }
        //List<ProjectContribution> list  = con.findContributionByStudentIdAndProjectId(1,1);
        //System.out.println(pro.getPm_status());

        //ConSysByUser con = new ConSysByUser();
        //con.showContributionByTeacherId(1);
        /*
        for (int i = 0; i < list.size(); i++) {
            System.out.println(list.get(i).toString());
        }
        */


        /*
        {
            //ProjectMemberDAO测试
            //创建ProjectDAO对象
            ProjectMemberDAO projectMemberDAO = new ProjectMemberDAOImpl();
            ProjectMember projectMember = new ProjectMember();

            projectMember.setStudent_id(7);
            projectMember.setP_id(1);
            projectMember.setPm_status(1);
            //新增测试
            //projectMemberDAO.addProjectMember(projectMember);

            //修改测试
            //projectMember.setStudent_id(1);

            //projectMemberDAO.updateProjectMember(projectMember);

            //选择测试
            //projectMember.setStudent_id(1);
            //projectMember.setP_id(1);
            //projectMember = projectMemberDAO.getProjectMember(projectMember);
            //System.out.println(projectMember.getPm_status());

            //全显示测试
            //List<ProjectMember> list = projectMemberDAO.getAllProjectMembers();
            //for (int i = 0; i < list.size(); i++) {
            //    System.out.println(list.get(i).toString());
            //}

            //查找测试
            //SearchMember searchMember = new SearchMember();
            //searchMember.setStudent_id(1);
            //searchMember.setP_id(1);
            //List<ProjectMember> list = projectMemberDAO.findProjectMember(searchMember);
            for (int i = 0; i < list.size(); i++) {
                System.out.println(list.get(i).toString());
            }


        }
        */

        /*
        //project.setP_name("修改后的名字");
        //Project project1 = projectDAO.getProject(0);
        //ist<Project> prolist = projectDAO.getAllProjects();
        SearchProject searchProject = new SearchProject();
        searchProject.setP_type("科学研究");
        List<Project> mylist = projectDAO.findProject(searchProject);
        for(int i = 0; i < mylist.size();i++){
            System.out.println(mylist.get(i).toString());
        }
        */

        /*

         */
        {
            //ProjectMemberDAO测试
            //创建ProjectDAO对象
            //ProjectContributionDAO projectContributionDAO = new ProjectContributionDAOImpl();
            //ProjectContribution projectContribution = new ProjectContribution(3,3,"计算机",3,"1111-11","干活",100);

            //projectContribution.setContribution_id(3);
            //projectContribution.setStudent_id(3);
            //projectContribution.setP_id(3);
            //projectContribution.setP_task("门卫");
            //新增测试
            //projectContributionDAO.addProjectContribution(projectContribution);

            //修改测试
            //projectContributionDAO.updateProjectContribution(projectContribution);

            //选择测试
            //projectMember.setStudent_id(1);
            //projectMember.setP_id(1);
            //projectContribution = projectContributionDAO.getProjectContribution(3);
            //System.out.println(projectContribution.toString());

            //全显示测试
            //List<ProjectContribution> list = projectContributionDAO.getAllProjectContribution();

            //查找测试
            //SearchContribution searchContribution = new SearchContribution();
            //searchContribution.setP_task("医药");
            //name?
            //List<ProjectContribution> list = projectContributionDAO.findProjectContribution(searchContribution);
            //for (int i = 0; i < list.size(); i++) {
            //    System.out.println(list.get(i).toString());
            //}
        }
    }
}